package cn_06.service.impl;

import cn_06.dao.UserDao;
import cn_06.entity.User;
import cn_06.service.UserService;

public class UserServiceImpl implements UserService {
    //只声明接口类型引用
    private UserDao dao;

    public void setDao(UserDao dao) {
        this.dao = dao;
    }
//无参构造

    public UserServiceImpl(){}

    public UserServiceImpl(UserDao dao) {
        this.dao = dao;
    }

    @Override
    public void save(User user) {
        dao.save(user);
    }
}
